package com.demo.config;

public class A {
    /**
     * 代码块
     * @author Xu
     *
     */

}
class Student {
    static {
        System.out.println("Student 静态代码块");// 3
    }

    {
        System.out.println("Student 构造代码块");// 4、6
    }

    public Student() {
        System.out.println("Student 构造方法");// 5、7
    }
}

class BlockTest {
    static {
        System.out.println("Demo2_Student静态代码块");// 1
    }

    public static void main(String[] args) {
        System.out.println("我是main方法");// 2

        Student s1 = new Student();
        Student s2 = new Student();
    }
}
